<?php
class AdminController extends Controller
{
    public $layout = '//layouts/admin';
    public function filters()
    {
        return array('accessControl',);
    }
    public function accessRules()
    {
        return array(
            array(
                'allow',
                'actions' => array('authOnly'),
                'users' => array('@'),
            ),
            array
            (
                'allow',
                'actions' => array('index','ext'),
                'users' => array('admin'),
            ),
            array('deny'),
        );
    }
    public function actionIndex()
    {
        $this->render('index');
    }
        public function actionCategory()
    {
        $this->render('category');
    }
}